import pytest

@pytest.fixture
def fun():
    print('开始')
    num = 100
    yield num
    print("结束")
@pytest.fixture(scope="class")
def fun1():
    print('1开始')
    yield
    print('1结束')
class TestPYTE:
    def test001(self,fun):
        print(fun)
        print("t1hello")
    def test002(self,fun,fun1):
        print("t2hello")
    def test003(self,fun,fun1):
        print('t3hello')